package com.bnz.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.bnz.pojo.Classes;
import com.bnz.pojo.R;
import com.bnz.pojo.Student;
import com.bnz.service.ClassesService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/classes")
@RestController
public class ClassesController {
    @Reference
    private ClassesService classesService;

    @GetMapping("/list")
    public R findAll(){
      List<Classes> classes = classesService.findAll();
        return R.ok().data("list",classes);
    }
}
